import { markRaw } from 'vue';
import { RouteRecordRaw } from 'vue-router';
import RouterTransition from '@/components/routerTransition.vue';

const routeName = 'chain';

const routes: Array<RouteRecordRaw> = [
    {
        path: '/chain',
        name: routeName,
        redirect: '/chain/store',
        component: markRaw(RouterTransition),
        meta: {
            title: 'yl.chainTitle',
            icon: 'CreditCardOutlined',
        },
        children: [
            {
                path: 'chainstore',
                name: `${routeName}-chainstore`,
                meta: {
                    title: 'yl.chainstoreList',
                    icon: 'people',
                },
                component: () => import(/* webpackChunkName: "customer" */ '@/views/customer/store/index.vue'),
            },

            {
                path: 'area',
                name: `${routeName}-area`,
                meta: {
                    title: 'yl.area',
                    icon: 'people',
                },
                component: () => import(/* webpackChunkName: "customer" */ '@/views/customer/area/index.vue'),
            },
            {
                path: 'control',
                name: `${routeName}-control`,
                meta: {
                    title: 'yl.controlPrice',
                    icon: 'people',
                },
                component: () => import(/* webpackChunkName: "customer" */ '@/views/chain/control/index.vue'),
            },
            {
                path: 'pagecutting',
                name: `${routeName}-pagecutting`,
                meta: {
                    title: 'yl.pageCutting',
                    icon: 'people',
                },
                component: () => import(/* webpackChunkName: "customer" */ '@/views/chain/pageCutting/index.vue'),
            },
        ],
    },
];

export default routes;
